#! gnuplot

#set terminal latex size 7cm, 5cm
#set output "eg2.tex"
#set format xy "$%g$"
set title 'cuqu::queue fetch() benchmark'
set xlabel 'Thread blocks'
set ylabel 'Time per invocation (us)'
set key bottom right
set yrange [0:20]
plot "queue_mark_32.dat"  using 2:5 with lp title "32 threads", \
     "queue_mark_64.dat"  using 2:5 with lp title "64 threads", \
     "queue_mark_128.dat" using 2:5 with lp title "128 threads", \
     "queue_mark_256.dat" using 2:5 with lp title "256 threads", \
     "queue_mark_512.dat" using 2:5 with lp title "512 threads"

#set title 'This is a plot of $y=\sin(x)$'
#set xlabel 'This is the $x$ axis'
#set ylabel 'This is\\the\\$y$ axis'
#plot [0:6.28] [0:1] sin(x)

#set style histogram columnstacked
#plot for [i = 3:8] "queue_mark.dat" using i title columnhead

#set key left
#plot [0:1] for [n=1:4] x**n sprintf("%d",n)

#list = "apple banana cabbage daikon eggplant"
#item(n) = word(list,n)
#plot for [i=1:words(list)] item[i].".dat" title item(i)
#list = "new stuff"
#replot

pause -1